const state = {
  title: '',
  left: true,
  path: undefined,
  icon: undefined
}

const mutations = {
  SET: (state, palyload) => {
    const { title, left = true, path, icon } = palyload
    state.title = title
    state.left = left
    state.path = path
    state.icon = icon
  }
}

const actions = {
  set({ commit, state, dispatch }, palyload) {
    // console.log('header, set,', palyload)
    commit('SET', palyload)
    return new Promise(resolve => {
      resolve()
    })
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
